package csel.controller.events;

import java.awt.event.KeyEvent;

import csel.controller.bindings.KeyBindings;
import csel.controller.enums.ActionEnum;

/**
 * Purpose: To map keypresses to ActionEnums
 * 
 * @author Nikolas Wolfe
 */

public class KeyPress implements Event
{
	private final KeyEvent event;
	private final KeyBindings keyBindings;
	
	public KeyPress( KeyEvent event, KeyBindings keyBindings )
	{
		this.keyBindings = keyBindings;
		this.event = event;
	}

	public ActionEnum getActionEnum()
	{
		return keyBindings.getEnum(event.getKeyCode());
	}
	
	public KeyEvent getKeyEvent()
	{
		return this.event;
	}
}
